package Mangos::DB::Characters::Petition;

use strict;

use base qw(Mangos::DB::Characters);

__PACKAGE__->meta->setup
(
    table   => 'petition',

    columns => 
    [
        ownerguid    => { type => 'integer', not_null => 1 },
        petitionguid => { type => 'integer', default => '0' },
        name         => { type => 'varchar', default => '', length => 255, not_null => 1 },
        type         => { type => 'integer', not_null => 1 },
    ],

    primary_key_columns => [ 'ownerguid', 'type' ],

    unique_key => [ 'ownerguid', 'petitionguid' ],
);

1;

package Mangos::DB::Characters::Petition::Manager;

use strict;
use warnings;

use base 'Rose::DB::Object::Manager';

sub object_class { 'Mangos::DB::Characters::Petition' }

__PACKAGE__->make_manager_methods('petition');

1;
